package BSServer;

import java.io.*;
import java.net.Socket;

public class ServerReadTheard extends Thread {
    private Socket socket;

    public ServerReadTheard() {

    }
    public ServerReadTheard(Socket socket) {
        this.socket = socket;
    }
    @Override
    public void run() {
        try {
            OutputStream outputStream = socket.getOutputStream();
            PrintStream printStream = new PrintStream(outputStream);
            printStream.println("HTTP/1.1 200 OK");
            printStream.println("Content-Type: text/html;charset=utf-8");
            printStream.println("");
            printStream.println("<div style='color:red;font-size:120px;text-align:center'>测试123</div>");
            socket.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
